﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.ComponentModel;

namespace DC2010_Editor
{
    public class CrystalPanel : Panel
    {
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            CrystalPaint.DrawPushedHighlight(e.Graphics, HighlightColor, LightColor, this.ClientRectangle, CrystalPaint.RenderMode.HighQuality, (float)0.50);

            Rectangle r = this.ClientRectangle;
            r.Width--;
            r.Height--;

            e.Graphics.DrawRectangle(new Pen(BorderColor),r);
        }

        private Color _highlightColor;
        [Browsable(true), DefaultValue(typeof(Color), "105, 105, 105"), Description("The Color of a highlighted item.")]
        public Color HighlightColor
        {
            get
            {
                return _highlightColor;
            }
            set
            {
                if (_highlightColor != value)
                {
                    _highlightColor = value;
                    base.Invalidate();
                }
            }
        }

        private Color _lightColor;
        [Browsable(true), DefaultValue(typeof(Color), "240, 240, 240"), Description("The Color of a highlighted item.")]
        public Color LightColor
        {
            get
            {
                
                return _lightColor;
            }
            set
            {
                if (_lightColor != value)
                {
                    _lightColor = value;
                    base.Invalidate();
                }
            }
        }

        private Color _borderColor;
        [Browsable(true), DefaultValue(typeof(Color), "255, 255, 255"), Description("The Color of a highlighted item.")]
        public Color BorderColor
        {
            get
            {

                return _borderColor;
            }
            set
            {
                if (_borderColor != value)
                {
                    _borderColor = value;
                    base.Invalidate();
                }
            }
        }


    }
}
